//
//  HMSportTracking.h
//  XRSport
//
//  Created by acer on 16/10/21.
//  Copyright © 2016年 apple. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "HMSportTrackingLine.h"
//通知的名称
extern  NSString *const HMSportNotificationGPSSignal;
//运动类型的选择枚举类型
typedef enum: NSUInteger {
    HMSportTypeWalk = 0,
    HMSportTypeRun,
    HMSportTypeRide
} HMSportType;

/// 运动状态枚举
typedef enum : NSUInteger {
    HMSportStatePause,
    HMSportStateContinue,
    HMSportStateFinish,
} HMSportState;

//GPS信号强度枚举
typedef enum: NSUInteger
{
    HMSPortGPSSignalDisconnect,
    HMSPortGPSSignalBad,
    HMSPortGPSSignalNormal,
    HMSPortGPSSignalGood
}HMSPortGPSSignal;
@interface HMSportTracking : NSObject
/**
 运动类型
 */
@property (nonatomic, assign, readonly) HMSportType sportType;
//运动状态
@property(nonatomic, assign) HMSportState sportState;
//运动图像（大头针）
@property (nonatomic, weak) UIImage *sportImage;
//平均速度
@property(nonatomic, readonly) double avgSpeed;
//最大速度
@property(nonatomic, readonly) double maxSpeed;
//总距离 单位米
@property(nonatomic, readonly) double totalDistance;
//总时长 单位秒
@property(nonatomic, readonly) double totalTime;
//显示时间字符串
@property (nonatomic, readonly ,weak) NSString *totalTimeStr;
//运动起点
@property (nonatomic, readonly) CLLocation *startSportLocation;
//
- (instancetype)initWithSportType:(HMSportType)sportType sportState:(HMSportState)sportState;
//追加当前用户位置，返回折线模型
- (MAPolyline *)appendLocation:(CLLocation *)location;

@end
